package com.ntt.register.dao.impl;

import com.ntt.DB.DBHelper;
import com.ntt.register.dao.UserInfoDao;
import com.ntt.vo.UserInfo;

public class UserInfoDaoImpl implements UserInfoDao {
	// 声明DBHelper
	private DBHelper dbHelper = new DBHelper();

	public boolean insertUserInfo(UserInfo userInfo) {
		String sql = "insert into userinfo(usernum,username,sex,national,phone,email,address,work,password,confirmpwd)value(?,?,?,?,?,?,?,?,?,?)";
		int n = dbHelper.execOthers(sql, userInfo.getUsernum(),
				userInfo.getUsername(), userInfo.getSex(),
				userInfo.getNational(), userInfo.getPhone(),
				userInfo.getEmail(), userInfo.getAddress(), userInfo.getWork(),
				userInfo.getPassword(), userInfo.getConfirmpwd());
		if (n > 0)
			return true;
		return false;
	}

}